package team.zero.lemon.common.security.session;

import team.zero.lemon.common.security.session.model.Session;

/**
 * 用户上下文
 * Created by wangbolin on 16/03/09.
 */
public class SessionContext {

    private static Session session;
    /**
     *获取当前用户信息
     */
    public static Session getSession() {
        return SessionManager.getIstance().GetCurrentUserSessionInfo();
    }
    public static Session getSessionByToken(String token) {
        return SessionManager.getIstance().GetUserSessionInfoByToken(token);
    }
    public static void setSession(Session session) {
        SessionContext.session = session;
    }
}
